$border-color: #2d3748;

.root {
  color: var(--primary-font-color);
  font-family: var(--font-family-body, Inter);
  font-size: var(--font-size-xs, 14px);
  font-style: normal;
  font-weight: 400;
  line-height: 140%; /* 19.6px */
  width: fit-content;
  position: absolute;
  right: 0;
  top: 0;
  @media (max-width: 1309px) {
    top: 32px;
    left: 16px;
  }
}

.anchor {
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  width: fit-content;
  border: 1px solid var(--disabled-font-color);
  background: var(--surface-primary);
  &.active {
    background: var(--surface-brand-grey);
  }
}

.overlayWrapper {
  opacity: 0;
  pointer-events: none;
  @media (max-width: 599px) {
    position: fixed;
    height: 100vh;
    z-index: 102;
    width: 100vw;
    background: rgb(9, 10, 21, 0.75);
    top: 0;
    left: 0;
  }
  .container {
    transform: translateY(-8px);
  }
  &.showOverlay {
    .container {
      transform: translateY(0);
    }
  }
}

.showOverlay {
  opacity: 1;
  pointer-events: auto;
}

.container {
  background: var(--surface-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10);
  border-radius: 8px;
  bottom: 0;
  position: absolute;
  width: 100%;
  overflow: hidden;
  right: 0;
  transition: transform 300ms ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  @media (min-width: 600px) {
    top: 100%;
    margin-top: 16px;
    bottom: unset;
    width: auto;
  }
}
[data-theme="dark"]:root .container {
  border: 1px solid var(--disabled-font-color);
}

.item {
  color: var(--primary-font-color);
  width: max-content;
  min-width: 100%;
  cursor: pointer;
  padding: 6px 12px;
  background: var(--surface-primary);
  transition: background 300ms ease-out;
  &:hover {
    background: var(--surface-brand-grey-strong);
  }
}

.topPos {
  @media (min-width: 600px) {
    top: unset !important;
    left: 0 !important;
    transform: unset !important;
    bottom: 100% !important;
  }
  & > * {
    width: 100%;
    display: inline-block;
  }

  a {
    color: inherit;
  }
}
